package mytest.com.myapplication;

import android.arch.lifecycle.Lifecycle;
import android.arch.lifecycle.LifecycleObserver;
import android.arch.lifecycle.OnLifecycleEvent;
import android.util.Log;

/**
 * Created by 王家宝 on 2017/11/1.
 * Email:639586819@qq.com
 * Tel:18241150668
 */

public class MyLocationListener implements LifecycleObserver {


    @OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
    public void state1() {
        Log.d("MyLocationListener", "This is OnCreate");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_START)
    public void state2() {
        Log.d("MyLocationListener", "This is Start");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
    public void state3() {
        Log.d("MyLocationListener", "This is Resume");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
    public void state4() {
        Log.d("MyLocationListener", "This is Pause");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
    public void state5() {
        Log.d("MyLocationListener", "This is Stop");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
    public void state6() {
        Log.d("MyLocationListener", "This is OnDestroy");
    }


}
